package com.zdp.chat.handler;

import com.alibaba.fastjson.JSON;
import com.zdp.chat.entity.chat.inner.ImageInner;
import com.zdp.chat.entity.chat.req.ImageReq;
import com.zdp.chat.entity.chat.resp.ImageResp;
import com.zdp.chat.enums.ContextTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ImageMessageHandler extends AbstractChatMessageHandler<ImageReq, ImageInner, ImageResp> {

    @Override
    public boolean apply(Integer messageType) {
        return ContextTypeEnum.IMG.getType().equals(messageType);
    }

    @Override
    protected ImageInner convertInner(ImageReq imageReq) {
        log.info("image原始对象:{}", JSON.toJSONString(imageReq));
        return null;
    }

    @Override
    protected void roomHandler(ImageInner imageInner) {

    }

    @Override
    protected void saveMessage(ImageInner imageInner) {

    }

    @Override
    protected void publishMessageEvent(ImageInner imageInner) {

    }

    @Override
    protected ImageResp convertResp(ImageInner imageInner) {
        return null;
    }
}
